import { GET_CHANNEL_LIST,GET_ARTICLE_LIST } from '../../constants/actionType'

const initValue = {
    channels: [],
    articles: {}
  }
  export default function article(state = initValue, action) {
    if (action.type === GET_CHANNEL_LIST) {
      return {
        ...state,
        channels: action.payload
      }
    }
    if (action.type === GET_ARTICLE_LIST) {
      return {
        ...state,
        articles: action.payload
      }
    }
    return state
  }